CREATE TABLE [dbo].[App_presup_costo]
(
[id_presup] [dbo].[_codigo] NOT NULL,
[id_costo] [dbo].[_codigo] NOT NULL,
[importe] [dbo].[_importe] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[App_presup_costo] ADD CONSTRAINT [PK_presup_costo] PRIMARY KEY CLUSTERED  ([id_presup], [id_costo]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[App_presup_costo] ADD CONSTRAINT [FK_presup_costo_costo] FOREIGN KEY ([id_costo]) REFERENCES [dbo].[App_costo] ([id_costo])
GO
ALTER TABLE [dbo].[App_presup_costo] ADD CONSTRAINT [FK_presup_costo_presup_cab] FOREIGN KEY ([id_presup]) REFERENCES [dbo].[App_presup_cab] ([id_presup])
GO
EXEC sp_bindefault N'[dbo].[cero]', N'[dbo].[App_presup_costo].[importe]'
GO
